package cn.wolfcode.p2p.mgrsite.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.wolfcode.p2p.base.util.JSONResult;
import cn.wolfcode.p2p.business.domain.platformBankInfo;
import cn.wolfcode.p2p.business.query.platformBankInfoQuery;
import cn.wolfcode.p2p.business.service.IplatformBankInfoService;

/**
 * 后台 : 对公账号控制器
 */
@Controller
public class platformBankInfoController {
	@Autowired
	private IplatformBankInfoService platformBankInfoService;
	// 查询所有对公账号
	@RequestMapping("/companyBank_list")
	private String companyBankList(Model model, platformBankInfoQuery qo){
		model.addAttribute("pageInfo", platformBankInfoService.query(qo));
		return "platFormbankinfo/list";
	}
	
	// 添加或修改对公账号
	@RequestMapping("/companyBank_update")
	@ResponseBody
	private Object saveOrUpdate(platformBankInfo pb){
		platformBankInfoService.saveOrUpdate(pb);
		return new JSONResult();
	}
}
